"""
while 条件 :
	条件满足时，做的事...

"""
i = 0
while i < 100:
    print(f"Hello World!，i = {i}")
    i += 1

"""
while 嵌套
while 条件 :
	条件满足时，做的事...
	while 条件 : 
		条件满足时，做的事...
"""

import random
num = random.randint(1,100)
flag = True
while flag:
    guess = int(input("猜数字："))
    if guess == num:
        print("猜中了")
        flag = False
    elif guess > num:
        print("大了")
    else:
        print("小了")